
package br.com.usjt.locadoraweb.model;

import br.com.usjt.locadoraweb.dao.LoginDAO;

public class Login {
	
	private int id = 0;
	private String user = "";
	private String password = "";
	
	public Login(){}
	
	public Login (Login login) {
		
	}
	
	//public Login (int id, String user, String password) {
	//	this.id = id;
	//	this.user = user;
	//	this.password = password;
	//}
	
	public void setId(int id) {
		this.id = id;
	}
	
	public int getId() {
		return id;
	}
	
	public void setUser(String user) {
		this.user = user;
	}

	public String getUser() {
		return user;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getPassword() {
		return password;
	}
	
	public boolean validate(Login login) {
		LoginDAO verifica = new LoginDAO();
		if(verifica.searchUser(getUser(), getPassword()))
			return true;
		else
			return false;
	}
}

